package com.jic.purchase.constant.enums;


/**
 * 
 * 部门类型枚举
 *
 */
public enum DeptTypeEnum {
	LPLATFORM_TYPE(0, "平台"),
	SUPPLIER_TYPE(1, "供应商"),
	MERCHANT_TYPE(2, "商家"),
	STORE_TYPE(3, "店铺"),

	;

	private Integer type;
	private String typeDesc;


	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getTypeDesc() {
		return typeDesc;
	}

	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}

	private DeptTypeEnum(Integer type, String typeDesc){
		this.type = type;
		this.typeDesc = typeDesc;
	}


	public static String getDeptTypeDescByType(Integer status) {
		if(status == null){
			return "";
		}
		String statusName = null;
		for (DeptTypeEnum enumVal : DeptTypeEnum.values()) {
			if (enumVal.getType().equals(status)) {
				statusName = enumVal.getTypeDesc();
				break;
			}
		}
		return statusName;
	}
}
